package com.pioneer.swing.ui;


import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JTextField;
import javax.swing.BorderFactory;
import javax.swing.JScrollPane;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;


/**
 * Title:        Pioneer Metals Application
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:      Pioneer Metals
 * @author Gary Chen
 * @version 1.0
 */


public class ContainerEntryFrame extends JInternalFrame {
	public String selectedSupplier;
    public JTable containerContentTable;
	public JLabel jobNumLabel=new JLabel();
	public JTextField containerIdTextField=new JTextField(10);
	public JComboBox supplierNameComboBox = new JComboBox();
	public JButton deleteButton;
	public JButton contactEditorButton;

    public ContainerEntryFrame() {
    	super(UIConstants.TITLE_CONTAINER_ENTRY,true,true);
		this.setName(UIConstants.TITLE_CONTAINER_ENTRY);
		this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

    	JPanel mainPanel=new JPanel(new BorderLayout());
		mainPanel.setBorder(BorderFactory.createEmptyBorder(
                                        15, //top
                                        15, //left
                                        5, //bottom
                                        15) //right
										);
		JPanel centerPanel=new JPanel();
		centerPanel.setLayout(new BorderLayout());

		JPanel headerPanel=new JPanel(new GridLayout(1,1));
		JPanel firstRow=new JPanel();
		firstRow.add(new JLabel("Job Number: "));
		firstRow.add(jobNumLabel);
		firstRow.add(new JLabel("Container ID: "));
		firstRow.add(containerIdTextField);
		firstRow.add(new JLabel("Supplier: "));
		firstRow.add(supplierNameComboBox);
		headerPanel.add(firstRow);
		centerPanel.add(headerPanel,BorderLayout.NORTH);

		containerContentTable=new JTable();


		JScrollPane scrollPane=new JScrollPane(containerContentTable);
		centerPanel.add(scrollPane,BorderLayout.CENTER);
		JPanel buttonPanel=new JPanel();
		buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));
		deleteButton=new JButton(UIConstants.COMMAND_DELETE_CONTAINER_CONTENT);
		buttonPanel.add(deleteButton);
		contactEditorButton = new JButton(UIConstants.COMMAND_OPEN_METALS_CONTACTEDITOR);
		buttonPanel.add(contactEditorButton);
		centerPanel.add(buttonPanel,BorderLayout.SOUTH);
		mainPanel.add(centerPanel);
	   	this.getContentPane().add(mainPanel,BorderLayout.CENTER);
    }
    public static void main(String[] args) {


        ContainerEntryFrame mainMenuFrame = new ContainerEntryFrame();
    }




}
